This invention relates to a film-forming method, and in particular a method for forming an organic film or and inorganic/organic composite film having excellent adhesion properties and anti-corrosion properties in surface treatment of a metal material, and to a metal material on which such a film is formed.